<template>
	<van-action-sheet v-model:show="visible">
		<div class="content">
			<view v-if="shopstatus == '-1'">
				<strong class="font-40">{{ $t('home.notCertified') }}</strong>
				<van-button size="large" type="primary" class="shadow certified" @click="certified">{{ $t('home.goCertification') }}</van-button>
			</view>
			<view v-else>
				<strong class="font-40">{{$t('home.inreview')}}</strong>
				<van-button size="large" type="primary" class="shadow certified" @click="inreview">{{$t('home.see')}}</van-button>
			</view>
		</div>
	</van-action-sheet>
</template>

<script setup>
	import {
		ref,
		computed
	} from "vue"
	const props = defineProps(["show","shopstatus"])
	const emit = defineEmits(['update:show'])
	
	const visible = computed({
	  get: () => props.show,
	  set: (val) => {
	    emit("update:show",val)
	  },
	})
	const shopstatus = computed({
	  get: () => props.shopstatus,
	  set: (val) => {
	    emit("update:shopstatus",val)
	  },
	})
	
	const certified = (item) => {
		uni.navigateTo({
			url:'/pages/my/merchantauth'
		})
	};
	const inreview = (item) =>{
		uni.redirectTo({
			url:'/pages/shop/index'
		})
	}
</script>

<style lang="scss" scoped>
	.content {
		padding: 57rpx 45rpx;

		.certified {
			margin-top: 205rpx;
			width: 100%;
		}
	}
</style>
